
*************************************************
*
* WELFARE MASTER FILE (this induces the welfare maximization simulations)
*
*************************************************

clear all
set more off
set trace off

parallel setclusters 6, f


*Define Program for 3y welfare maximization and execute the 6 separate loops simultaneously:
cap program drop myprogram
program def myprogram
  if ($pll_instance == 1) do  "$root/Code/Estimation/Welfare_max/welfare_max08_3y_1.do"
  else if ($pll_instance == 2) do "$root/Code/Estimation/Welfare_max//welfare_max08_3y_2.do"
  else if ($pll_instance == 3) do "$root/Code/Estimation/Welfare_max//welfare_max08_3y_3.do"
    else if ($pll_instance == 4) do "$root/Code/Estimation/Welfare_max//welfare_max08_3y_4.do"
	else  if ($pll_instance == 5) do  "$root/Code/Estimation/Welfare_max//welfare_max08_3y_5.do"
  else if ($pll_instance == 6) do "$root/Code/Estimation/Welfare_max//welfare_max08_3y_6.do"
end
parallel, nodata prog(myprogram): myprogram
